package com.ruoyi.medication.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 药物库存对象 medication_stock
 * 
 * @author ruoyi
 * @date 2025-04-12
 */
public class MedicationStock extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Long id;

    /** 药物id */
    @Excel(name = "药物id")
    private Long medicationId;

    /** 供应商id */
    @Excel(name = "供应商id")
    private Long supplierId;

    /** 生产日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createDate;

    /** 药物有效期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "药物有效期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationDate;

    /** 当前库存数量 */
    @Excel(name = "当前库存数量")
    private Long quantity;

    /** 供应单价 */
    @Excel(name = "供应单价")
    private BigDecimal price;

    /** 状态：1-正常，2-过期 */
    @Excel(name = "状态", readConverterExp = "1=正常,2=过期")
    private String status;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setMedicationId(Long medicationId) {
        this.medicationId = medicationId;
    }

    public Long getMedicationId() {
        return medicationId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setExpirationDate(Date expirationDate) {
        this.expirationDate = expirationDate;
    }

    public Date getExpirationDate() {
        return expirationDate;
    }

    public void setQuantity(Long quantity) {
        this.quantity = quantity;
    }

    public Long getQuantity() {
        return quantity;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("medicationId", getMedicationId())
                .append("supplierId", getSupplierId())
                .append("createDate", getCreateDate())
                .append("expirationDate", getExpirationDate())
                .append("quantity", getQuantity())
                .append("price", getPrice())
                .append("status", getStatus())
                .toString();
    }
}
